Converting Relational Databases into Object-relational Databases

نویسندگان

  • Abdelsalam M. Maatuk
  • Muhammad Akhtar Ali
  • B. Nick Rossiter
چکیده

ion (abs): A super-class is abstract (i.e., abs := true) when all of its objects are members of its sub-type objects. Instances of an abstract type cannot appear in the database extension, but are subsumed into instances of its sub-types. Attributes (Acdm): A class C has a set of attributes Acdm. Acdm := {a | a := 〈an, t, tag, l, n, d〉}, where each attribute a has a name an, data type t and a tag, which classifies a as a non-key ‘NK’, ‘PK’, ‘FK’ or both PK and FK ‘PF’ attribute. Each a can have a length l and may have a default value d whereas n indicates whether or not a is nullable (‘y’|‘n’). 148 JOURNAL OF OBJECT TECHNOLOGY VOL 9, NO. 2 3 SEMANTIC ENRICHMENT OF RELATIONAL DATABASE Relationships (Rel): A class C has a set of relationships Rel. Each relationship rel ∈ Rel between C and class C ′ is defined in C to represent an association, aggregation or inheritance. Rel := {rel | rel := 〈RelType, dirC, dirAs, c, invAs〉}, where RelType is a relationship type, dirC is the name of C ′, and dirAs denotes a set containing the attribute names representing the relationship from the C ′ side. The invAs denotes a set of inverse attribute names representing the inverse relationship from the C side, and c is the cardinality constraint of rel from the C side. RelType can have the following values: ‘associated with’ for association, ‘aggregates ’ for aggregation, and ‘inherits ’ or ‘inherited by ’ for inheritance. Relationships have two cases: 1:1 and 1:M, and c is defined by min..max notation to indicate the minimum and maximum occurrences of objects of C ′ within objects of C. Based on c, the object(s) of C ′ can be single-valued where c := 0..1 (optional) or c := 1..1 (required), or set-valued where c := 0..* (optional) or c := 1..* (required). Unique keys (UK): A class C may have a set of UK(s) that are preserved in UK: UK := {δ | δ := {〈ua, s〉}}, where δ represents one key, ua is an attribute name, and s is a sequence number. Generation of CDM from RDB: Using key matching, relations and their attributes are classified, relationships among relations are identified and their cardinalities are determined. All these are translated into equivalents in the CDM. The semantically enriched CDM forms the starting point for the remaining steps of the migration process that leads to the generation of the target schema and then the conversion of relational data into target data. Each relation R is classified based on the comparison of its PK with the PKs of other relations, and mapped into one of the nine CDM classes above. After class C is classified, it is important, if C.cls := (“SST” | “SSC”), to check whether C is concrete or abstract. C is a concrete class (i.e., abs := false) when all (or some) of its corresponding RDB table rows are not members of other sub-tables, and abstract otherwise. Attributes of R are identified and mapped along with other properties into attributes of C. The keys of R are used to generate the relationships Rel of C. Using this information, the relationships among relations are identified, their cardinalities determined, and they are then mapped into Rel as association, inheritance or aggregation. Using the corresponding data, every relationship that R participates in is identified and mapped into an equivalent relationship rel and added to Rel. Example 1: Consider the RDB shown in Figure 1. PKs are in italics and FKs are marked by “*”. Table 1 shows (partly) the resulting CDM. Each RDB relation is mapped into a class in CDM. For instance, the relation Emp is mapped into the CDM class Emp, which is an abstract SST class, and has the attributes: ename, eno, bdate, address, spreno and dno. Other properties of the attributes (e.g., types, tags) are shown. The class is ‘associated with’ the classes: Dept (twice), Works on and with itself (twice). Moreover, it ‘aggregates ’ the Kids class and is ‘inherited by ’ the VOL 9, NO. 2 JOURNAL OF OBJECT TECHNOLOGY 149 CONVERTING RELATIONAL DATABASES INTO OBJECT-RELATIONAL DATABASES Salaried emp and Hourly emp classes. Cardinality c and UKs are also given for each class. Figure 1: Sample input RBD cn cls abs Acdm Rel UK an t tag l n d RelType dirC dirAs c invAs ua s Emp SST true eno int PK 25 n asso Dept dno 1..1 dno ename char 40 n asso Dept mgr 0..1 eno bdate date y asso Emp eno 1..1 spreno address char 40 y asso Emp spreno 0..* eno spreno int FK 25 y asso Works on eno 1..* eno dno int FK n aggr Kids eno 0..* eno inherBy Salaried emp eno 1..1 eno inherBy Hourly emp eno 1..1 eno Salaried emp SUB false eno int PF 25 n inherts Emp eno 1..1 eno salary int y Dept RST false dno int PK n asso Emp eno 1..1 mgr mgr 1 dname char 40 n asso Emp dno 1..* dno mgr int FK 25 n asso Proj dnum 1..* dno startd date y aggr Dept locations dno 1..* dno Works on RRC false eno int PF 25 n asso Emp eno 1..1 eno pno int PF n asso Proj pnum 1..1 pno asso: associated with aggr : aggregates inherBy: inherited by Table 1: Results of CDM generation 4 TRANSLATING CDM INTO OBJECT-RELATIONAL SCHEMA This section presents the translation of CDM into object-relational schema. We first define the SQL4 ORDB target schema, and then explain the rules for translating the CDM constructs into their equivalents in the target schema.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Ontograte: towards Automatic Integration for Relational Databases and the Semantic Web through an Ontology-Based Framework

Integrating existing relational databases with ontology-based systems is among the important research problems for the Semantic Web. We have designed a comprehensive framework called OntoGrate which combines a highly automatic mapping system, a logic inference engine, and several syntax wrappers that inter-operate with consistent semantics to answer ontology-based queries using the data from he...

متن کامل

Converting relational database into XML documents with DOM

The revolution of XML is recognized as the trend of technology on the Internet to researchers as well as practitioners. Companies need to adopt XML technology. With investment in the current relational database systems, they want to develop new XML documents while running existing relational databases on production. They need to reengineer the relational databases into XML documents with constr...

متن کامل

KDD – Knowledge Discovery in Databases

2 Database Management Systems 3 2.1 Three-Schema Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 Organisation of an Integrated Database System . . . . . . . . . . . . . . . . . . . . 5 2.3 Hierarchical and Network Databases . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.4 Relational Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....

متن کامل

A DOM-Based Approach of Storage and Retrieval of XML Documents Using Relational Databases

This paper describes a novel approach of storage and retrieval of XML documents using relational databases. In this approach, an XML document is decomposed into nodes based on its tree structure, and stored into relational tables according to the nodes types. Our approach enables us to store XML documents using a fixed relational schema without any information about XML schema, and DTD. For the...

متن کامل

Object oriented databases – a natural part of object oriented software development ?

The technology of object oriented databases was introduced to system developers in the late 1980’s. Despite that it is rarely used today. This thesis introduces the concept of object oriented databases as the purposed solution to the problems that exist with the use of relational databases. The thesis points to the advantages with storing the application objects in the database without disassem...

متن کامل

Query Interoperation Among Object-Oriented and Relational Databases

We develop an eecient algorithm for the translation of high-order object queries to rst-order relational queries. The translation utilizes a canonical deductive database as a uniform representation of object-oriented schema and data. Object queries are translated to the canonical deductive database in which they are partially evaluated and optimized, before being translated to relational querie...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Journal of Object Technology

دوره 9  شماره 

صفحات  -

تاریخ انتشار 2010